package com.bluefish.bltuan.tools;

import com.bluefish.bltuan.module.mail.EmailVariable;

public class EmailUtils {

	public static String generate(String orignal, EmailVariable[] variables,
				String[] values){
		if(orignal != null){
			String temp = orignal;
			for(int i=0;i<variables.length&&i<values.length;i++){
				String rep = variables[i].getKey();
				temp = temp.replaceAll(rep, values[i]);
			}
			return temp;
		}
		return null;
	}
}
